from pydantic_settings import BaseSettings
from pydantic import ConfigDict

class Settings(BaseSettings):
    """
    应用配置类，使用pydantic进行配置管理
    可以从环境变量或.env文件中读取配置
    """
    
    # 项目配置
    PROJECT_NAME: str = "股票量化分析系统"
    PROJECT_VERSION: str = "0.1.0"
    PROJECT_DESCRIPTION: str = "个人股票量化分析系统"
    
    # 服务器配置
    HOST: str = "0.0.0.0"
    PORT: int = 8000
    
    # 数据库配置
    DATABASE_URL: str = "sqlite+aiosqlite:///./stock_data.db"
    
    model_config = ConfigDict(
        env_file=".env",
        case_sensitive=True
    )

# 创建全局配置实例
settings = Settings()